<!DOCTYPE html>
<html>
	<head th:replace="/mobile/common::head(~{::custom_settings})">
		<th:block th:fragment="custom_settings">
			<title>顺山科技智慧生活服务平台</title>
			<link type="text/css" rel="stylesheet" th:href="@{{css}/mobile/member/mobileshoppingcart/mobileShoppingAddress.css(css=${css})}"/>
			<link type="text/css" rel="stylesheet" th:href="@{{css}/mobile/member/mobileshoppingcart/ydui/ydui.css(css=${css})}"/>
			<script type="text/javascript" th:src="@{{js}/mobile/member/mobileshoppingcart/ydui/ydui.flexible.js(js=${js})}"></script>
			<script th:inline="javascript">
				var $receiviAreas = [[${receiviAreas}]], _isHome=[[${param.isHome == null ? false : true}]];
			</script>
		</th:block>
	</head>
	<body>
		<script type="text/javascript" th:src="@{{js}/mobile/member/mobileshoppingcart/ydui/ydui.js(js=${js})}"></script>
		<div class="weui-tab">
			<div class="weui-tab__bd">
			    <div class="weui-tab-title-shopping"><i class="fa fa-angle-left" onclick="addresses.backSubmieOrder();"></i><h1>管理地址</h1><span class="weui-newaddress" onclick="addresses.add();">添加新地址</span></div>
			    <div class="weui-jd-qrdd-bigbox" id="load_addresslist">
				    <th:block th:fragment="address_list" th:if="${addresses!=null}">
			    		<th:block th:if="${addresses.addresses!=null}">
			    			<div class="weui-jd-qrdd-a1" th:onclick="|addresses.backSubmieOrder('${addresses.addresses.entityid}');|">
					    		<span class="weui-qrdd-a1-t1" th:text="${addresses.addresses.receiver}"></span>
					    		<span class="weui-qrdd-a1-t1" th:text="${addresses.addresses.mobilephone}"></span>
					    		<i class="fa fa-edit " th:onclick="|addresses.edit('${addresses.addresses.entityid}');|"></i>
					    		<div class="weui-qrdd-a1-b1">
						    		<span class="weui-qrdd-a1-t2">默认</span>
					    			<span class="weui-qrdd-a1-t3" th:text="${addresses.addresses.detailaddress}"></span>
					    		</div>
					    	</div>
			    		</th:block>
				    	<th:block th:if="${addresses.addressesList}">
					    	<div class="weui-jd-qrdd-a1-edit">
					    		<th:block th:each="obj, i : ${addresses.addressesList}">
				    				<div class="weui-qrdd-a" th:onclick="|addresses.backSubmieOrder('${obj.entityid}');|">
							    		<span class="weui-qrdd-a1-t1-edit" th:text="${obj.receiver}"></span>
							    		<span class="weui-qrdd-a1-t1-edit" th:text="${obj.mobilephone}"></span>
							    		<i class="fa fa-edit " th:onclick="|addresses.edit('${obj.entityid}');|"></i>
						    			<i class="fa fa-trash" th:onclick="|addresses.del('${obj.entityid}');|"></i>
							    		<div class="weui-qrdd-a1-b1-edit">
							    			<span class="weui-qrdd-a1-t3-edit" th:text="${obj.detailaddress}"></span>
							    		</div>
						    		</div>
					    		</th:block>
					    	</div>
				    	</th:block>
			    	</th:block>
		    	</div>
		    </div>
	    </div>
	    <!-- 弹出新增地址start -->
        <div id="popup-add-address" class="weui-screening-categories">
			<div class="weui-sc-content">
				<div class="weui-tab">
					<div class="weui-tab__bd">
					    <div class="weui-tab-title-shopping"><i class="fa fa-angle-left" onclick="commonClick.clickCloseFullPopup('#popup-add-address');"></i><h1>添加新地址</h1><span onclick="addressAdd.save();">保存</span></div>
				    </div>
				    <div class="weui-jd-qrdd-bigbox">
				    	<div class="weui-cells">
					      <div class="weui-cell">
					        <div class="weui-cell__bd">
					          <input class="weui-input" type="text" placeholder="请输入收货人姓名" id="username">
					        </div>
					      </div>
					    </div>
				    	<div class="weui-cells">
					      <div class="weui-cell weui-cell_select weui-cell_select-before">
					        <div class="weui-cell__bd">
					          <input class="weui-input" type="text"  placeholder="请输入收货人号码" id="userphone">
					        </div>
					      </div>
					    </div>
					    <div class="weui-cells">
					      <div class="weui-cell weui-cell_select weui-cell_select-before">
					        <div class="weui-cell__bd">
					          <input class="weui-input" type="text" readonly id="region" placeholder="请选择收货地址">
					          <input type="hidden" id="addressid" >
					        </div>
					        <div class="weui-cell__hd">
					          <select class="weui-select" >
					           
					          </select>
					        </div>
					      </div>
					    </div>
					    <div class="weui-cells weui-cells_form">
					      <div class="weui-cell">
					        <div class="weui-cell__bd">
					          <textarea class="weui-textarea" placeholder="详细地址：如道路、门牌号、小区、楼栋号、单元室等" rows="3" id="detailed" maxlength="200"></textarea>
					          <div class="weui-textarea-counter"><span id="number">0</span>/200</div>
					        </div>
					      </div>
					    </div>
					    
					    <div class="weui-peis-xz">
				    		<div class="weui-kuaid" autoClose="false"><p>配送方式</p><span onclick="commonClick.popupDeliveryMode();"><em id="dm">自提</em><i class="fa fa-angle-right"></i></span><input type="hidden" id="dm_val" value="dm1"/></div>
				    		<!-- <div class="weui-kuaid"><p>发票信息</p><span onclick="commonClick.popupInvoiceMode();"><em id="invoicesmode">请选择</em><i class="fa fa-angle-right"></i></span><input type="hidden" id="invoicesmode_val" value="invoices1"/></div> -->
				    		<!-- <div class="weui-kuaid"><p>支付方式</p><span onclick="commonClick.popupPaymentMode();"><em id="pm">微信</em><i class="fa fa-angle-right"></i></span><input type="hidden" id="pm_val" value="dm1"/></div> -->
				    	</div>
					    
					    <div class="weui-cells weui-cells_form weui-cells-wtc">
						  <div class="weui-cell weui-cell_switch">
						    <div class="weui-cell__bd">设为默认地址</div>
						    <div class="weui-cell__ft">
						      <input class="weui-switch" type="checkbox" id="checkboxClick">
						    </div>
						  </div>
						</div>
				    </div>
			    </div>
		    </div>
	  </div>
      <!-- 弹出新增地址end -->
      
      <!-- 弹出配送方式start -->
      <div id="popup-deliverymode" class="weui-screening-categoriess">
			<div class="weui-sc-contentss">
	        <div class="toolbar">
	          <div class="toolbar-inner">
	            <a href="javascript:commonClick.clickDeliverymode();" class="picker-button close-popup">完成<!-- <i class="weui-icon-cancel" onclick="commonClick.clickCloseHalfPopup('#popup-deliverymode');"></i> --></a>
	            <h1 class="title">配送方式</h1>
	          </div>
	        </div>
	        <div class="weui-cells weui-cells_radio">
		      <label class="weui-cell weui-check__label" for="dm1">
		        <div class="weui-cell__bd">
		          <p>自提</p>
		        </div>
		        <div class="weui-cell__ft">
		          <input type="radio" class="weui-check" name="radio1" id="dm1" dm="dm">
		          <span class="weui-icon-checked"></span>
		        </div>
		      </label>
		      <label class="weui-cell weui-check__label" for="dm2">
		        <div class="weui-cell__bd">
		          <p>市场配送</p>
		        </div>
		        <div class="weui-cell__ft">
		          <input type="radio" name="radio1" class="weui-check" id="dm2" dm="dm">
		          <span class="weui-icon-checked"></span>
		        </div>
		      </label>
		      <!-- <a href="javascript:commonClick.clickDeliverymode();" class="weui-btn weui-btn_primary close-popup">完成</a> -->
		    </div>
	      </div>
       </div>
       <!-- 弹出配送方式end -->
       
       <!-- 弹出支付方式start -->
       <div id="popup-paymentmode" class="weui-screening-categoriess">
			<div class="weui-sc-contentss">
				<div class="toolbar">
		          <div class="toolbar-inner">
		            <a href="javascript:commonClick.clickPaymentmode();" class="picker-button close-popup">完成<!-- <i class="weui-icon-cancel" onclick="commonClick.clickCloseHalfPopup('#popup-paymentmode');"></i> --></a>
		            <h1 class="title">支付方式</h1>
		          </div>
		        </div>
		        <div class="weui-cells weui-cells_radio">
			      <label class="weui-cell weui-check__label" for="pm1">
			        <div class="weui-cell__bd">
			          <p>微信</p>
			        </div>
			        <div class="weui-cell__ft">
			          <input type="radio" class="weui-check" name="radio1" id="pm1" pm="pm">
			          <span class="weui-icon-checked"></span>
			        </div>
			      </label>
			      <label class="weui-cell weui-check__label" for="pm2">
			        <div class="weui-cell__bd">
			          <p>支付宝</p>
			        </div>
			        <div class="weui-cell__ft">
			          <input type="radio" name="radio1" class="weui-check" id="pm2" pm="pm">
			          <span class="weui-icon-checked"></span>
			        </div>
			      </label>
			      <label class="weui-cell weui-check__label" for="pm3">
			        <div class="weui-cell__bd">
			          <p>银联</p>
			        </div>
			        <div class="weui-cell__ft">
			          <input type="radio" name="radio1" class="weui-check" id="pm3" pm="pm">
			          <span class="weui-icon-checked"></span>
			        </div>
			      </label>
			      <!-- <a href="javascript:commonClick.clickPaymentmode();" class="weui-btn weui-btn_primary close-popup">完成</a> -->
			    </div>
			</div>
	   </div>
	   <!-- 弹出支付方式end -->
	 	
	   <!-- 弹出配送方式start -->
       <div id="popup-invoicemode" class="weui-screening-categoriess">
	      <div class="weui-sc-contentss">
		      <div class="toolbar">
		          <div class="toolbar-inner">
		            <a href="javascript:commonClick.clickInvoicemode();" class="picker-button close-popup">完成<!-- <i class="weui-icon-cancel" onclick="commonClick.clickCloseHalfPopup('#popup-invoicemode');"></i> --></a>
		            <h1 class="title">发票信息</h1>
		          </div>
		        </div>
		        <div class="weui-cells weui-cells_radio">
			      <label class="weui-cell weui-check__label" for="invoices1">
			        <div class="weui-cell__bd">
			          <p>电子发票</p>
			        </div>
			        <div class="weui-cell__ft">
			          <input type="radio" class="weui-check" name="radio1" id="invoices1" invoices="invoices">
			          <span class="weui-icon-checked"></span>
			        </div>
			      </label>
			      <label class="weui-cell weui-check__label" for="invoices2">
			        <div class="weui-cell__bd">
			          <p>普通发票</p>
			        </div>
			        <div class="weui-cell__ft">
			          <input type="radio" name="radio1" class="weui-check" id="invoices2" invoices="invoices">
			          <span class="weui-icon-checked"></span>
			        </div>
			      </label>
			      <!-- <a href="javascript:commonClick.clickInvoicemode();" class="weui-btn weui-btn_primary close-popup">完成</a> -->
			    </div>
	      </div>
       </div>
       <!-- 弹出配送方式end -->
	   <script type="text/javascript" th:src="@{{js}/mobile/member/mobileshoppingcart/mobileShoppingAddressHandler.js(js=${js})}"></script>
    </body>
</html> 